package demo2;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86138
 * Date: 2024-07-18
 * Time: 18:05
 */
public class Test {
    /*public static void main2(String[] args) {
        Integer a = 10;
        int b = a.intValue();
        System.out.println(a);
    }

    public static void main1(String[] args) {
        int a = 10;
        Integer b = Integer.valueOf(a);
    }*/

    public static void rotate(int[] nums, int k) {
        int[] s = new int [nums.length];
        System.arraycopy(nums,0,s,k,nums.length-k);
        System.arraycopy(nums,nums.length-k,s,0,k);
        System.arraycopy(s,0,nums,0,nums.length);
        System.out.println(Arrays.toString(nums));
    }

    public static void main(String[] args) {
        int[] nums = {1,2,3,4,5,6,7};
        rotate(nums,2);

    }
}
